import request from '@/utils/request'


export function getMenus() {
  return request({
    url: 'permissions',
    method: 'get',
  })
}

// 详情
export function editListInfo(id) {
  return request({
    url: 'permissions/' + id,
    method: 'get',
  })
}
// 更新
export function saveListInfo(id, data) {
  return request({
    url: 'permissions/' + id,
    method: 'put',
    data,
    msg: true
  })
}

export function add(data) {
  return request({
    url: 'permissions',
    method: 'post',
    data,
    msg: true
  })
}

export function delBtn(id) {
  return request({
    url: 'permissions/' + id,
    method: 'delete',
    msg: true
  })
}
